<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/13 0013
 * Time: 上午 10:43
 */
namespace app\AbstractInterface;

Trait Singleton{
    private static $instance;

    public static function getInstance(...$args)
    {
        if(!isset(self::$instance)){
            //通过static静态绑定来new绑定的对象
            self::$instance=new static(...$args);
        }
        return self::$instance;
    }
}